package com.zmzncs.lmtc.module.customer.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zmzncs.lmtc.module.customer.pojo.card.RechargeInfoVO;
import com.zmzncs.lmtc.module.customer.pojo.card_record.CardRecord;
import com.zmzncs.lmtc.module.customer.pojo.card_record.CardRecordDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 客户-月租卡购买记录 Mapper 接口
 * </p>
 *
 * @author 任建波
 * @since 2020-08-26
 */
@Repository
public interface CardRecordDao extends BaseMapper<CardRecord> {

    /**获取客户累计支付金额*/
    BigDecimal getCustomerPaidAmount(Long customerId);
    /**根据订单号查询购买记录*/
    CardRecordDTO getCardRecordByOrderCode(String orderCode);
    /**查询月租卡购买记录*/
    List<CardRecordDTO> getMonthCardRecord(Long customerId);
    /**查询时长卡购买记录*/
    List<CardRecordDTO> getDurationCardRecord(Long customerId);
    /**查询充值记录*/
    List<CardRecordDTO> getRechargeCardRecord(Long customerId);

    /**查询用户月卡信息*/
    CardRecordDTO getCustomerMonthCardRecord(@Param("parkId") Long parkId, @Param("carNum") String carNum, @Param("selectDate") Date selectDate);

    /**查询用户充值信息*/
    Double getUserRechargeInfo(Long customerId);


}
